<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta charset="utf-8">
		<title>问答系统首页</title>
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<meta name="keywords" content="">
		<meta name="description" content="">
		<link rel="stylesheet" th:href="@{/res/layui/css/layui.css}">
		<link rel="stylesheet" th:href="@{/res/css/global.css}">
        <link rel="stylesheet" type="text/css" th:href="@{/assets/css/layui.css}"/>
        <link rel="stylesheet" type="text/css" th:href="@{/assets/css/view.css}"/>
<!--header-->
		<link rel="stylesheet" type="text/css" th:href="@{/home/styles/bootstrap4/bootstrap.min.css}">
		<link th:href="@{/home/plugins/font-awesome-4.7.0/css/font-awesome.min.css}" rel="stylesheet" type="text/css">
		<link rel="stylesheet" type="text/css" th:href="@{/home/plugins/OwlCarousel2-2.2.1/owl.carousel.css}">
		<link rel="stylesheet" type="text/css" th:href="@{/home/plugins/OwlCarousel2-2.2.1/owl.theme.default.css}">
		<link rel="stylesheet" type="text/css" th:href="@{/home/plugins/OwlCarousel2-2.2.1/animate.css}">
		<link rel="stylesheet" type="text/css" th:href="@{/home/plugins/jquery.mb.YTPlayer-3.1.12/jquery.mb.YTPlayer.css}">
		<link rel="stylesheet" type="text/css" th:href="@{/home/styles/main_styles.css}">
		<link rel="stylesheet" type="text/css" th:href="@{/home/styles/responsive.css}">

		<!--load-->
		<link rel="stylesheet" th:href="@{/load/CSDN下载-IT资源大本营_files/content_toolbar.css}">
		<link rel="stylesheet" th:href="@{/load/CSDN下载-IT资源大本营_files/bootstrap.css}">
		<link rel="stylesheet" th:href="@{/load/CSDN下载-IT资源大本营_files/common.css}">
		<link href="https://csdnimg.cn/public/favicon.ico" rel="SHORTCUT ICON">
		<link th:href="@{/load/CSDN下载-IT资源大本营_files/quake.slider.css}" rel="stylesheet" type="text/css">
		<link rel="stylesheet" th:href="@{/load/CSDN下载-IT资源大本营_files/font-awesome.min.css}">
		<script th:src="@{/load/CSDN下载-IT资源大本营_files/libs.js.下载}" type="text/javascript"></script>
		<script th:src="@{/load/CSDN下载-IT资源大本营_files/sigleMin.js.下载}" type="text/javascript"></script>
		<link rel="stylesheet" th:href="@{/load/CSDN下载-IT资源大本营_files/download_index.css}">
		<link rel="canonical" href="http://download.csdn.net/">
		<link rel="stylesheet" type="text/css" th:href="@{/load/CSDN下载-IT资源大本营_files/goTop.min.css}"><script type="text/javascript" charset="utf-8" th:src="@{/load/CSDN下载-IT资源大本营_files/tracking-1.0.2.js.下载}"></script><script type="text/javascript" charset="utf-8" th:src="@{/load/CSDN下载-IT资源大本营_files/main-1.0.2.js.下载}"></script><script type="text/javascript" th:src="@{/load/CSDN下载-IT资源大本营_files/baidu_opensug-1.0.0.js.下载}"></script><script th:src="@{/load/CSDN下载-IT资源大本营_files/get_ads.php}" type="text/javascript"></script><style type="text/css"></style><style type="text/css"></style><style type="text/css"></style><style type="text/css"></style><style type="text/css"></style><style type="text/css"></style><style type="text/css"></style><style type="text/css"></style><style type="text/css"></style><style type="text/css"></style><style type="text/css"></style></head>


	<script th:src="@{/res/layui/layui.js}"></script>
	</head>
	<body>
	<header class="header">
		<div class="container">
			<div class="row">
				<div class="col">
					<div class="header_content d-flex flex-row align-items-center justify-content-start">
						<div class="logo"><a th:href="@{/m}">EDU</a></div>
						<nav class="main_nav">
							<ul>
								<li class="active"><a th:href="@{/resourceByName}">下载首页</a></li>
								<li><a th:href="@{/upload}">上传赚C币</a></li>
								<li><a th:href="@{/upload}">无</a></li>
								<li><a th:href="@{/queryhomepage}">无</a></li>
								<li><a th:href="@{/queryhomepage}">无</a></li>
							</ul>
						</nav>
						<div class="search_container ml-auto">

							<form action="#">
								<input type="search" class="header_search_input" required="required" placeholder="Type to Search...">
								<img class="header_search_icon" th:src="@{/home/images/search.png}" alt="">
							</form>
							&nbsp;&nbsp;<a th:href="@{/login}">登录</a>&nbsp;|&nbsp;<a th:href="@{/register}">注册</a>						</div>
						<div class="hamburger ml-auto menu_mm">
							<i class="fa fa-bars trans_200 menu_mm" aria-hidden="true"></i>
						</div>
					</div>
				</div>
			</div>
		</div>
	</header>
	</div>
		<div class="main layui-clear">
			<div class="wrap">
				<div class="content" style="margin-right:0">
					<div class="fly-tab">
						<form th:action="@{/resourceByName}" action="" class="fly-search">
							<i class="iconfont icon-sousuo"></i>
							<input class="layui-input" autocomplete="off" placeholder="搜索内容" type="text" name="resourceName">
						</form>
						<a th:href="@{/upload}" href="add.html" class="layui-btn jie-add">上传资源</a>
					</div>
					<tbody>
					<tr th:each="list:${resourcelist}">
						<div class="album_detail_list clearfix">
							<dt><a target="_blank" href="https://download.csdn.net/download/sinat_33943657/10758729"><img th:src="@{/load/CSDN下载-IT资源大本营_files/unkonw.svg}" alt="img"></a>
								&nbsp;&nbsp;&nbsp;&nbsp;<a th:href="@{/resourcedetail(id=${list.id})}" th:text="${list.resourceName}">PopMusic-master</a>
							</dt>

							<dd>
								<div class="album_detail_bot clearfix">
									<label><span>上传者：</span>
										<em class="upl_name">
											szumrhu                                                                                                    </em>
									</label>&nbsp;&nbsp;&nbsp;
									<label><span>上传时间：</span><em th:text="${#dates.format(list.uploadTime, 'yyyy-MM-dd')}" class="upl_time">2018-11-01</em></label>&nbsp;&nbsp;&nbsp;&nbsp;
									<strong><span class="jifen">积分/C币：</span>
										<em>
											5                                                </em>
									</strong>
								</div>
							</dd>
						</div>
					</tr>
					</tbody>
					<div id="pagination"></div>
					<!--加载菜单数据-->
					<div class="show-menu-data" style="display: none;padding: 10px">
					</div>
				</div>
			</div>
		</div>
		</div>
		</div>
		<script th:src="@{/assets/layui.all.js}"></script>
		<script th:inline="javascript">
            /*<![CDATA[*/
            var count = [[${count}]];//总记录数
            var curr = [[${curr}]];//当前页
			var username=[[${resourceName}]]
            var contextPath = [[${#request.getContextPath()}]]; //获取当前应用路径
            /*]]>*/
		</script>
		<script type="text/javascript">
            layui.use('laypage', function(){
                var laypage = layui.laypage;

                //执行一个laypage实例
                laypage.render({
                    elem: 'pagination' //注意，这里的 data 是 ID，不用加 # 号
                    ,count: count //数据总数，从服务端得到
                    ,curr: curr
					,username: username
                    ,limit: 5
                    ,jump: function(obj, first){
                        //obj包含了当前分页的所有参数，比如：
                        console.log(obj.curr); //得到当前页，以便向服务端请求对应页的数据。
                        console.log(obj.limit); //得到每页显示的条数

                        //首次不执行
                        if(!first){
                            window.location.href = contextPath + "/resourceByName?page=" + (obj.curr) + "&size=" + obj.limit+"&resourceName="+(obj.username)
                        }
                    }
                });
            });
		</script>
				</div>
			</div>
		</div>
	</body>
</html>